Optimal. Leaf size=105 \[ -\frac {b \left (3 a^2+b^2\right ) \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {(a-b)^3 \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b)^3 \log (1-\sin (c+d x))}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2721, 801, 633, 31} \[ -\frac {b \left (3 a^2+b^2\right ) \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {(a-b)^3 \log (\sin (c+d x)+1)}{2 d}-\frac {(a+b)^3 \log (1-\sin (c+d x))}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 801
Rule 2721
Rubi steps
\begin {align*} \int (a+b \sin (c+d x))^3 \tan (c+d x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x (a+x)^3}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-3 a^2-b^2-3 a x-x^2+\frac {3 a^2 b^2+b^4+a \left (a^2+3 b^2\right ) x}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b \left (3 a^2+b^2\right ) \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\operatorname {Subst}\left (\int \frac {3 a^2 b^2+b^4+a \left (a^2+3 b^2\right ) x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b \left (3 a^2+b^2\right ) \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {(a-b)^3 \operatorname {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}+\frac {(a+b)^3 \operatorname {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{2 d}\\ &=-\frac {(a+b)^3 \log (1-\sin (c+d x))}{2 d}-\frac {(a-b)^3 \log (1+\sin (c+d x))}{2 d}-\frac {b \left (3 a^2+b^2\right ) \sin (c+d x)}{d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 90, normalized size = 0.86 \[ -\frac {6 b \left (3 a^2+b^2\right ) \sin (c+d x)+9 a b^2 \sin ^2(c+d x)+3 \left ((a-b)^3 \log (\sin (c+d x)+1)+(a+b)^3 \log (1-\sin (c+d x))\right )+2 b^3 \sin ^3(c+d x)}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 116, normalized size = 1.10 \[ \frac {9 \, a b^{2} \cos \left (d x + c\right )^{2} - 3 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (b^{3} \cos \left (d x + c\right )^{2} - 9 \, a^{2} b - 4 \, b^{3}\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 139, normalized size = 1.32 \[ -\frac {a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}-\frac {3 a^{2} b \sin \left (d x +c \right )}{d}-\frac {3 a \,b^{2} \left (\sin ^{2}\left (d x +c \right )\right )}{2 d}-\frac {3 a \,b^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}-\frac {b^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{3 d}-\frac {b^{3} \sin \left (d x +c \right )}{d}+\frac {b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.30, size = 113, normalized size = 1.08 \[ -\frac {2 \, b^{3} \sin \left (d x + c\right )^{3} + 9 \, a b^{2} \sin \left (d x + c\right )^{2} + 3 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, {\left (3 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.75, size = 226, normalized size = 2.15 \[ \frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^3+3\,a\,b^2\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,a^2\,b+2\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (6\,a^2\,b+2\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (12\,a^2\,b+\frac {20\,b^3}{3}\right )+6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,{\left (a-b\right )}^3}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (a+b\right )}^3}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \tan {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________